import React from 'react';
import api from '../lib/api';

class Blog extends React.Component {
  constructor(props) {
    super(props);
    this.state = { list: [{ k: '1' }] }
  }
  componentDidMount() {
    console.info('Blog')
    api("/user/showList").then(res => {
      console.info('res', res)
      this.setState({ list: res.data });
    })
  }
  render() {
    return (
      <div>
        Blog1
        {this.state.list.map((item, index) => {
          return (
            <div key={index}>{item.id} {item.text} {item.status}</div>
          )
        })}
      </div>
    )
  }
}

export default Blog